1 <%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true"
2     CodeFile=
"Default.aspx.cs" Inherits="Default" Title="Trang chu" %>
3
4 <%@ Register Assembly=
"AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxToolkit" %>
5 <%@ Register TagPrefix=
"cc1" Namespace="SiteUtils" Assembly="CollectionPager" %>
6 <asp:Content ID=
"Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
7     &nbsp;<asp:AccessDataSource ID=
"AccessDataSource1" runat="server" DataFile="~/App_Data/dienthoaididong.mdb"
8         SelectCommand=
"SELECT tblsanpham.masp, tblsanpham.tensp, tblsanpham.gia, tblsanpham.soluong, tblsanpham.dacdiem,'chitiet.aspx?tensp='+tensp as chitiet, tblsanpham.baohanh, tblsanpham.khuyenmai, tblsanpham.kieudang, tblsanpham.phongcach, tblsanpham.anh, tblsanpham.mahang, tblhang.tenhang FROM (tblsanpham INNER JOIN tblhang ON tblsanpham.mahang = tblhang.mahang) WHERE (tblsanpham.phongcach = 'độc đáo')">
9     </asp:AccessDataSource>
10     <asp:DataList ID=
"DataList1" runat="server" RepeatColumns="4">
11         <ItemTemplate>
12             <table style=
"border-right: black 1px solid; border-top: black 1px solid; border-left: black 1px solid;
13                 width: 142px; border-bottom: black 1px solid; height: 154px; background-color: #ffffff"
>
14                 <tr>
15                     <td align=
"left" style="width: 205px; height: 12px; text-align: center" valign="middle">
16                         <asp:Label ID=
"Label1" runat="server" Text='<%# Eval("tenhang") %>'></asp:Label>
17                     </td>
18                 </tr>
19                 <tr>
20                     <td align=
"center" style="width: 205px; height: 100px; text-align: center" valign="top">
21                         <asp:Image ID=
"Image4" runat="server" Height="86px" ImageUrl='<%# "dienthoai/"+Eval("anh") %>'
22                             Width=
"85px" />
23                     </td>
24                 </tr>
25                 <tr>
26                     <td align=
"center" style="width: 205px; height: 14px; text-align: center" valign="top">
27                         <asp:HyperLink ID=
"HyperLink1" runat="server" Height="40px" Text='<%# Eval("tensp") %>'
28                             NavigateUrl=
'<%# Eval("chitiet") %>'></asp:HyperLink>
29                     </td>
30                 </tr>
31                 <tr>
32                     <td align=
"center" style="width: 205px" valign="top">
33                         <div align=
"center" style="font-size: 12px; color: #cc0000; font-family: Tahoma">
34                             <asp:Label ID=
"Label6" runat="server" Font-Size="Smaller" Text="Giá"></asp:Label>
35                             <asp:Label ID=
"Label7" runat="server" Font-Size="Smaller" Text='<%# Eval("gia") %>'
36                                 Width=
"37px"></asp:Label>
37                             <span style=
"font-size: 9pt">VNĐ</span></div>
38                     </td>
39                 </tr>
40                 <tr>
41                     <td style=
"width: 205px; height: 18px; text-align: center" valign="top">
42                         <asp:Label ID=
"Label8" runat="server" Font-Size="Smaller" Text="Bảo hành"></asp:Label>
43                         <asp:Label ID=
"Label9" runat="server" Font-Size="Smaller" Text='<%# Eval("baohanh") %>'
44                             Width=
"56px"></asp:Label>
45                     </td>
46                 </tr>
47                 <tr>
48                     <td style=
"width: 205px; height: 18px; text-align: center" valign="top">
49                         <asp:ImageButton ID=
"ImageButton2" runat="server" ImageUrl="~/Images/Chonmua1.jpg" />
50                     </td>
51                 </tr>
52                 <tr>
53                     <td style=
"width: 205px; height: 18px; text-align: center" valign="top">
54                         <asp:Label ID=
"Label10" runat="server" Enabled="False" Font-Size="Smaller" Text="Đã đưa vào giỏ hàng"
55                             Visible=
"False" Width="111px"></asp:Label>
56                     </td>
57                 </tr>
58             </table>
59         </ItemTemplate>
60         <HeaderTemplate>
61             <table cellpadding=
"0" cellspacing="0">
62                 <tr>
63                     <td colspan=
"2" height="32" style="font-weight: bold; background-image: url(Images/thanhngang2.gif);
64                         background-repeat: repeat-x; color: White; width: 700px"
align="center">
65                         Để dễ dàng chọn hàng, bạn hãy kích vào nút Xem theo hàng hoặc cột
66                     </td>
67                 </tr>
68                 <tr style=
"background-color: #d8d8d8">
69                     <td>
70                         Xem:
71                         <asp:ImageButton ID=
"imgcot1" runat="server" Height="22px" ImageUrl="~/Images/sapxep1.jpg"
72                             ToolTip=
"Hiển thị theo cột" Width="26px" />
73                         <asp:ImageButton ID=
"imghang1" runat="server" Height="22px" ImageUrl="~/Images/sapxep2.jpg"
74                             ToolTip=
"Hiển thị theo hàng" Width="26px" />
75                     </td>
76                     <td style=
"text-align: right">
77                         <asp:DropDownList ID=
"DropDownList1" runat="server" AutoPostBack="True" ForeColor="#40698F">
78                             <asp:ListItem Value=
"theo">Sắp xếp theo</asp:ListItem>
79                             <asp:ListItem Value=
"tang">Giá tăng dần</asp:ListItem>
80                             <asp:ListItem Value=
"giam">Giá giảm dần</asp:ListItem>
81                             <asp:ListItem Value=
"moi">Sản phẩm mới</asp:ListItem>
82                         </asp:DropDownList>
83                     </td>
84                 </tr>
85             </table>
86         </HeaderTemplate>
87     </asp:DataList>
88     <asp:AccessDataSource ID=
"AccessDataSource2" runat="server" DataFile="~/App_Data/dienthoaididong.mdb"
89         SelectCommand=
"SELECT [soluong], [dacdiem], [phongcach], [tensp] FROM [tblsanpham] WHERE ([phongcach] = ?)">
90         <SelectParameters>
91             <asp:QueryStringParameter Name=
"phongcach" QueryStringField="độc đáo" Type="String"
92                 DefaultValue=
"độc đáo" />
93         </SelectParameters>
94     </asp:AccessDataSource>
95     <asp:Panel ID=
"Panel1" runat="server" Height="142px" Width="247px">
96         <asp:DataList ID=
"DataList2" runat="server" DataSourceID="AccessDataSource2" Height="16px"
97             Width=
"155px" CellPadding="4" ForeColor="#333333" RepeatColumns="1"
98             UseAccessibleHeader=
"True"
99             onselectedindexchanged=
"DataList2_SelectedIndexChanged">
100             <FooterStyle BackColor=
"#990000" Font-Bold="True" ForeColor="White" />
101             <AlternatingItemStyle BackColor=
"White" />
102             <ItemStyle BackColor=
"#FFFBD6" ForeColor="#333333" />
103             <SelectedItemStyle BackColor=
"#FFCC66" Font-Bold="True" ForeColor="Navy" />
104             <HeaderStyle BackColor=
"#990000" Font-Bold="True" ForeColor="White" />
105             <ItemTemplate>
106                 <asp:Label ID=
"Label12" runat="server" Font-Bold="True" Font-Underline="True" ForeColor="#FF3300"
107                     Text=
'<%# Eval("tensp") %>'></asp:Label>
108                 <br />
109                 <asp:Label ID=
"Label11" runat="server" Text='<%# Eval("dacdiem") %>'></asp:Label>
110                 <br />
111             </ItemTemplate>
112         </asp:DataList>
113     </asp:Panel>
114     <cc1:CollectionPager ID=
"clp1" runat="server" LabelText="Trang:"
115         ResultsFormat=
"Số trang {0}-{1} (trong {2})">
116     </cc1:CollectionPager>
117     <ajaxToolkit:HoverMenuExtender ID=
"hme1" runat="server" TargetControlID="DataList1"
118         PopupControlID=
"Panel1" PopupPosition="Right" PopDelay="25">
119     </ajaxToolkit:HoverMenuExtender>
120     <br />
121 </asp:Content>



Quản lý website giới thiệu và bán điện thoại di động ASP.net 19.274 lượt xem

Gõ tìm kiếm nhanh...